<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百分百和100vw</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        .box1{
            width: 100vw;
            height:1000px;
            background: yellow;   
            }
        .box2{
            width: 100%;
            height: 1000px;
            background: red;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>

    <!-- 没有滚动条的时候
    100vw === 100% 

    有滚动条
    100vw 包含滚动条，窗口大小
    100% 刨除滚动条 剩余空间占满
    -->
</body>
</html>